cmake_minimum_required(VERSION 3.15)

# 设置项目信息
project(EasyBrep
    VERSION 0.1.0
    DESCRIPTION "EasyBrep - A simple BREP geometry application"
    LANGUAGES CXX
)

# 设置C++标准
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# 设置包含目录

option(BUILD_TESTS "Build the test suite" ON)

# 设置输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# 添加子目录
add_subdirectory(src)

# 可选：添加测试目录（如果tests目录有CMakeLists.txt文件）
if(BUILD_TESTS) 
    enable_testing()
    add_subdirectory(tests)
endif()

message(STATUS "")
message(STATUS "================ Project Configuration ================")
message(STATUS "Project:            " ${PROJECT_NAME})
message(STATUS "Building tests:     " ${BUILD_TESTS})
message(STATUS "C++ Standard:       " ${CMAKE_CXX_STANDARD})
message(STATUS "Output Directory:   " ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
message(STATUS "=======================================================")
message(STATUS "")
# 安装配置将在子目录中设置
